package main

import (
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/orm"
	_ "github.com/astaxie/beego/orm"
	_ "github.com/go-sql-driver/mysql"
	_ "test/routers"
)
// Model Struct
type User struct {
	Id   int
	Name string `orm:"size(100)"`
}

func init() {
	// 注册驱动
	orm.RegisterDriver("mysql",orm.DRMySQL)
	// 注册默认数据库
	orm.RegisterDataBase("default", "mysql", "task:m85sCYwaKfEsyaC6@tcp(116.205.141.80:3306)/task?charset=utf8")
//	db, _ := sql.Open("mysql", "task:m85sCYwaKfEsyaC6@tcp(116.205.141.80:3306)/task")
}
func main() {
	beego.Run()
}

